import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: '404',
      // 懒加载路由资源 修改 build下面的webpack.prod.conf.js  output对象中增加   publicPath: "./"
      component: resolve => require(['@/page/404'], resolve),
      meta: {
        title: '404'
      }
    },
    {
      path: '/report',
      name: 'report',
      component: resolve => require(['@/page/report'], resolve),
      meta: {
        title: '报表'
      }
    },
    {
      path: '/test',
      name: 'test',
      component: resolve => require(['@/page/test'], resolve),
      meta: {
        title: '测试'
      }
    },
    {
      path: '*',
      redirect: '/'
    }
  ]
})
